﻿using csharp_rentals_415.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace csharp_rentals_415
{
    public class RentalService
    {
        // Singleton...
        private static RentalService _instance = null;
        public static RentalService Instance
        {
            get {
                if (_instance == null)
                {
                    _instance = new RentalService();
                }
                return _instance;
            }
        }
        /// /Singleton
        /// 

        // Greeting
        public string Greeting = "Hello Singleton world!";

        // List of Land Properties (Rental & Condo)
        public List<RealEstate> Properties = new List<RealEstate>()
        {
            new Rental(){Address="11200 Broadway Street", Realtor="Kiego", RentAmount=5000, SquareFootage=500, UnitId=5 },
            new Rental(){Address="6001 Fannin St", Realtor="Mike", RentAmount=20000, SquareFootage=1000, UnitId=6},
            new Rental(){Address="8400 Kirby", Realtor="Kiego", RentAmount=100000, SquareFootage=10, UnitId=17},
            new Condo(){Address="1234 Elm", Realtor="Andrew", PurchaseAmount=100, SquareFootage=2, UnitId=27},
            new Condo(){Address="555 Washington", Realtor="Elmo", PurchaseAmount=777, SquareFootage=20, UnitId=22}

        };

        //
    }
}